public class Voie {
	private int numVoie;
	private Train trainEnCours;
	
	public Voie(int numVoie) {
		this.numVoie = numVoie;
		trainEnCours = null;
	}
	public boolean estLibre() {
		return trainEnCours == null;
	}
	
	public void accueillir(Train train) {
		this.trainEnCours = train;
	}
	
	public boolean occupePar(Train t) {
		return trainEnCours != null && trainEnCours == t;
	}
    
    public Train getTrainEnCours(){
    	return trainEnCours;
    }
    
    public int getNumVoie(){
    	return numVoie;
    }
}
